<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="cmcc.customer.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
	request.setCharacterEncoding("utf-8");
	response.setCharacterEncoding("utf-8");
%>
<% 
	String flag = request.getParameter("flag");
	System.out.println("flag = "+flag);
	if(flag!=null&&flag.equals("newcustomer")){
		String id_number = request.getParameter("id_number");
		String id_type = request.getParameter("id_type");
		System.out.println("zhengjian = "+id_number);
		System.out.println("id_type = "+id_type);
		int customer_id = Customer.getCustomer_idByID(id_number);
		if(Customer.isExit(id_number)){
			%>
				<br><br><br>
				<h2 align="center">
					该客户已存在!
				</h2>
				<h3 align="center">
					<a href="<%=basePath%>kaihu/customer/customer_info.jsp?id_number=<%=customer_id%>">查看客户信息</a>
					&nbsp;&nbsp;&nbsp;
					<a href="<%=basePath%>kaihu/mobileUser/addMobile.jsp?id_number=<%=customer_id%>">查看该账户手机信息</a>
					&nbsp;&nbsp;&nbsp;
					<a href="<%=basePath%>kaihu/customer/customer_info.jsp?id_number=<%=customer_id%>">查看账户信息</a>
					
				</h3>
			<%
		}else{
			response.sendRedirect("new_customer_2.jsp?id_type="+id_type+"&id_number="+id_number);
			return;
		}
		
	}	

%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'checkZhengJian.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>

  </body>
</html>
